
/*
//计算布尔二叉树的值
class Solution {
    public boolean evaluateTree(TreeNode root) {
        return lastOrder(root);
    }

    public boolean lastOrder(TreeNode root) {
        if (root.left == null && root.right == null) {
            return root.val > 0;
        }
        boolean left = lastOrder(root.left);
        boolean right = lastOrder(root.right);
        if (root.val == 2) {
            return left || right;
        } else {
            return left && right;
        }
    }
}*/



/*
//开幕式烟火
class Solution {
    public int numColor(TreeNode root) {
        int[] map = new int[1001];
        int ans = 0;
        Queue<TreeNode> queue = new LinkedList<>();
        queue.add(root);
        while (!queue.isEmpty()) {
            TreeNode temp = queue.poll();
            if (map[temp.val] == 0) {
                ans++;
                map[temp.val] = 1;
            }
            if (temp.left != null) {
                queue.add(temp.left);
            }
            if (temp.right != null) {
                queue.add(temp.right);
            }
        }
        return ans;
    }
}*/
